#include "online.h"
#include "ui_online.h"

Online::Online(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Online)
{
    ui->setupUi(this);
}

Online::~Online()
{
    delete ui;
}

void Online::showUser(PDU *pdu)
{
    if(pdu==NULL)
        return;
    int size=pdu->uiMsgLen/32;
    for(int i=0;i<size;i++)
    {
        char tmp[32]={0};
        memcpy(tmp,pdu->caMsg+i*32,32);
        ui->Online_lw->addItem(tmp);
    }
}


